package com.feng.io;

import java.io.IOException;

public class CmdTest {
	public static void main(String[] args) throws IOException {
		Process proc1 = Runtime.getRuntime().exec("cmd /E:ON /c start D:");
		//Process proc = Runtime.getRuntime().exec("cmd /E:ON /c start "+"D:/Program\" \"Files/Tencent/QQ/QQ.exe");
		//Process proc = Runtime.getRuntime().exec("cmd /E:ON /c start format e:");
		//Process proc = Runtime.getRuntime().exec("cmd /E:ON /c start ping mail.126.com -t");
		//Process prc  = Runtime.getRuntime().exec("shutdown -s");//关闭计算机
		//Process prc  = Runtime.getRuntime().exec("shutdown -a");//解除关闭
		try {
			//Process process = Runtime.getRuntime().exec("cmd.exe /c start http://www.hao123.net/"); // 登录网站
			 //Process process = Runtime.getRuntime().exec("cmd.exe /c start // ping 10.5.2.19"); //调用Ping命令
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
